cmake_minimum_required(VERSION 2.8)

IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE Release)
ENDIF()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -Wall  -O3 -g -march=native ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -march=native")

set(SRC_LISTS test_gps.cpp fisheye.cpp ini.c INIReader.cpp coarseLocating.cpp)
find_package( OpenCV REQUIRED)
set(ORB_SLAM2_DIR /home/ubuntu/vision/libs/ORB_SLAM2-master)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions(-DCOMPILEDWITHC11)

find_package(Pangolin REQUIRED)


include_directories(
${ORB_SLAM2_DIR}
${ORB_SLAM2_DIR}/include
/usr/include
/usr/include/eigen3
)
link_directories(
${ORB_SLAM2_DIR}/lib
${ORB_SLAM2_DIR}/Thirdparty/DBoW2/lib
${ORB_SLAM2_DIR}/Thirdparty/g2o/lib
)
add_executable( test_gps ${SRC_LISTS}  )
target_link_libraries(
test_gps 
${OpenCV_LIBS} 
${Pangolin_LIBRARIES}
ORB_SLAM2 
g2o 
DBoW2)
